package com.example.hanchen.yongkanggy.utils;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.SeekBar;

import com.example.hanchen.yongkanggy.R;

@SuppressLint("AppCompatCustomView")
public class RoundedSeekBar extends SeekBar {

    public RoundedSeekBar(Context context) {
        super(context);
        init();
    }

    public RoundedSeekBar(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public RoundedSeekBar(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    private void init() {
        // 设置自定义的 drawable 作为进度条的样式
        setProgressDrawable(getContext().getResources().getDrawable(R.drawable.rounded_progress_bar_green));
    }
}